GetDataField(char *name, ...)
void *GetDataField(char *name, short *n, CXS_ACCESS_PATH *path, short force = FALSE)
Parameters | Description |
---|---|
name | an access printout (input) |
n | Number of terms in the access path (output) |
path | Access path (output) |
force | Create slot? (input) |
Return value | Description |
---|---|
Pointer | Storage address of the data field |
Return value NULL means that the target of the access expression was not reached. This can have various causes:
Term | Cause | ret. | type |
---|---|---|---|
name | Member NOT in DDI and NO slot | NULL | IDX_NOTHING ( - 1) |
name | Object does NOT have this slot and force=FALSE | NULL | Type of slot |
name-> | Pointer with value NULL | NULL | IDX_POINTER, IDX_REL_11 or IDX_REL_1M |
| Collection with less than k elements | NULL | IDX_COLL, IDX_REL_M1 or IDX_REL_MN |
name() | Function returns NULL | NULL | IDX_UNDEFINE (0) |
This function implements access to a data member via the DDI.
It is also possible to access a slot and, with the last parameter, even request that it first be created for write access - the prerequisite is an entry in the slot dictionary.
Since one is often only interested in the target of the access expression, a simpler variant of this function exists:
void *GetDataField(char *name, OBJECTID *type = NULL, short force = FALSE);
Parameters | Description |
---|---|
name | an access printout (input) |
type | Data type (output) |
force | Create slot? (input) |
Return value | Description |
---|---|
Pointer | Storage address of the data field |